package cn.elwy.upms.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.elwy.common.entity.ResultDto;
import cn.elwy.framework.annotation.DataAuth;
import cn.elwy.framework.controller.BaseController;
import cn.elwy.upms.entity.Appl;
import cn.elwy.upms.service.ApplService;

/**
 * ApplController
 * @author elwy
 * @version 1.0, 2018-02-19
 */
@RestController
@RequestMapping(value = "/appl")
public class ApplController extends BaseController<Appl> {
//	@Autowired
//	protected SQLManager sqlManager;

	public ApplController() {
		super("core/appl");
	}

	@Autowired
	public void setService(ApplService service) {
		super.setService(service);
	}

	@Override
	@DataAuth(codes = "appl")
	public ResultDto query(HttpServletRequest req, HttpServletResponse res) {
		try {
//			sqlManager
//			System.out.println(sqlManager);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
		return super.query(req, res);
	}
}